package com.example.aiinterview.service;

import com.example.aiinterview.model.User;
import java.util.List;
import java.util.Optional;

public interface UserService {
    User registerNewUser(String username, String password, String email, String fullName);
    User registerNewUser(String username, String password, String email, String fullName, User.Role role);
    User findByUsername(String username);
    boolean existsByUsername(String username);
    boolean existsByEmail(String email);
    
    // 用户管理功能
    List<User> findAllUsers();
    Optional<User> findById(Long id);
    User saveUser(User user);
    User updateUser(Long id, String username, String email, String fullName);
    User updateUserPassword(Long id, String newPassword);
    void deleteUser(Long id);
    boolean existsByUsernameAndIdNot(String username, Long id);
    boolean existsByEmailAndIdNot(String email, Long id);
}
